home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 18 / 64er_Magazin_Sonderheft_18_19xx_Markt__Technik_de_Side_A.d64 / change adress (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  2KB  |  57 lines

  1. 10 n1$="mastertext t3":n2$="mastertext t4":n3$="formular       f"
  2. 15 n4$="tabulatoren    b":u=8:d=0
  3. 60 print "bitte master-text 128 disk in laufwerk 8einlegen und taste druecken"
  4. 65 poke198,0:wait 198,1
  5. 70 for ix=1to4:
  6. 80 if ix=1then n$=n1$:p=896
  7. 85 if ix=2then n$=n2$:p=53248
  8. 90 if ix=3then n$=n3$:p=1024
  9. 95 if ix=4then n$=n4$:p=1792
  10. 110 v=16: q=32: f=256: n$=left$(n$,v)
  11. 120 h$="0123456789abcdef": z$=chr$(0)
  12. 130 t$=right$(str$(d),1): open 1,u,15,"i"+t$: gosub 620
  13. 140 t$=t$+":"+n$: open 2,u,2,t$+",p,r"
  14. 150 input#1,e,m$,j,k: if e=0 then 240
  15. 160 close 1: close 2: print " programm ";n$;
  16. 170 if e=62 then print " nicht gefunden ": goto 200
  17. 180 if e=64 then print " falscher filetyp": goto 200
  18. 190 print " disk read-error";e: end
  19. 200 for j=1 to 2000: next: goto 90
  20. 210 j=int(c/v): k=c-j*v
  21. 220 m$=m$+mid$(h$,j+1,1)+mid$(h$,k+1,1)
  22. 230 return
  23. 240 get#2,a$,b$: if st then 190
  24. 250 close 2: close 1: m$=""
  25. 260 a=asc(a$+z$): b=asc(b$+z$)
  26. 270 c=b: gosub 210: c=a: gosub 210
  27. 280 print"die startadresse von ";n$;" ist: ";
  28. 290 print"hexadezimal: ";m$;" dezimal:  ";b*f+a
  29. 300 print"und wird geaendert auf dezimal: ";p
  30. 340 b=int(p/f): a=p-b*f: p$=chr$(a)+chr$(b): m$=""
  31. 350 c=b: gosub 210: c=a: gosub 210
  32. 360 print " hex:  ";m$;"    decimal: ";b*f+a
  33. 390 j=len(n$): if j=v then 410
  34. 400 for x=j+1 to v:n$=n$+chr$(160):next
  35. 410 open 1,u,15: open 2,u,2,"#"
  36. 420 gosub 620: t=18: s=1
  37. 430 print#1,"u1:";2;d;t;s: gosub 620
  38. 440 print#1,"b-p:";2;0: get#2,a$,b$
  39. 450 t=asc(a$+z$): s=asc(b$+z$): h=2
  40. 460 print#1,"b-p:";2;h: get#2,t$
  41. 470 c=asc(t$+z$): if c<>130 then 510
  42. 480 get#2,a$,b$: f$="": for x=1 to v
  43. 490 get#2,t$: f$=f$+t$: next
  44. 500 if f$=n$ then 530
  45. 510 h=h+q: if h<f then 460
  46. 520 goto 430
  47. 530 a=asc(a$+z$): b=asc(b$+z$)
  48. 540 print#1,"u1:";2;d;a;b: gosub 620
  49. 550 print#1,"b-p:";2;2: print#2,p$;
  50. 560 print#1,"u2:";2;d;a;b: gosub 620
  51. 570 close 2: gosub 620: close 1
  52. 600 next ix
  53. 610 print"fertig! mastertext kann nun gestartet   werden":end
  54. 620 input#1,e,m$,j,k:if e=0 then return
  55. 630 print " error: ";e;m$;j;k
  56. 640 close 2: close 1: end
  57.